<template>
  <div class="dialog-wrap">
    <el-dialog
        :visible="dialogVisible"
        v-bind="$attrs" 
        v-on="$listeners"
        :close-on-click-modal="false"
        @close="close"
        >
        <template slot="title" v-if="$slots.title">
            <slot name="title">
                提示
            </slot>
        </template>
        <slot name="content"></slot>
        
  
        <span slot="footer" class="footer" >
            <div v-if="$slots.footer">
                <slot name="footer"></slot>
            </div>
           <div v-else>
                <el-button type="primary" @click="submit" size="small">确 定</el-button>
                <el-button @click="close" size="small">取 消</el-button>
              
           </div>
        </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
    props:{
        dialogVisible:{
            type:Boolean,
            default:false
        }
    },
    data(){
        return {
           
        }
    },
    created(){

    },
    methods:{
        submit(){
            this.$emit('submit')
        },
        close(){
            this.$emit('update:dialogVisible',false)
        }
    }
}
</script>
<style lang="scss" scoped>
    .dialog-wrap:deep(.el-dialog__body){
        background-color: #F2F4F4;
    }
    .dialog-wrap:deep(.el-dialog__footer){
        background-color: #F2F4F4;
    }
</style>